package com.atguigu01._this.exer1;

/**
 * ClassName: PersonTest
 * Description:
 *
 * @Author liu
 * @Create 2024/10/25 11:14
 * @Version 1.0
 */
public class BoyGirlTest {
    public static void main(String[] args) {
        boy boy1 = new boy("lucy",20);
        Girl girl1 = new Girl("mike",22);

        girl1.marry(boy1);
        boy1.marry(girl1);

        Girl girl2 = new Girl("mmm",18);
        int compare =girl1.compare(girl2);
        if(compare > 0){
            System.out.println(girl1.getName() + "大");
        }else if(compare < 0){
            System.out.println(girl2.getName() + "大");
        }else{
            System.out.println("一样大");
        }
    }
}
